package com.feihong.txgw.inter.contract.kaika;

import android.os.Bundle;

import com.feihong.txgw.model.bean.kaika.YuyueViewShowEnity;
import com.feihong.txgw.ui.mvp.model.IBaseModel;
import com.feihong.txgw.ui.mvp.precenter.AbBasePrecenter;
import com.feihong.txgw.ui.mvp.view.IBaseActivity;

import io.reactivex.Observable;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName ISubscribeKaikaContract
 * @package com.feihong.txgw.inter.contract.kaika
 * @data 2018/5/7 12:06
 * @Describe  预约开卡
 * @Change
 */
public interface ISubscribeKaikaContract {

    interface ISubscribeKaikaMainView extends IBaseActivity{

        void submitOrderResult(String result);

        /**
         * 为view设置初始值
         */
        void viewSetValue(YuyueViewShowEnity yuyueViewShowEnity);

        void setNewAdr(String adrName,String adrID);
    }

    interface ISubscribeKaikaMainModel extends IBaseModel{
        Observable<String> submitOrder(String specID, String phoneNum, String adrID, String deliveryType);

        Observable<YuyueViewShowEnity> parseBundleAndGetAdr(Bundle bundle);

        Observable<YuyueViewShowEnity> getNewAdr();
    }

    abstract class AbSubscribeKaikaPrecenter extends AbBasePrecenter<ISubscribeKaikaMainModel,ISubscribeKaikaMainView>{
        public abstract void submitOrder(String specID,String phoneNum,String adrID,String deliveryType);

        /**
         * 解析bundle并获取默认地址
         * @param bundle
         */
        public abstract void parseIntentAndGetDefAdr(Bundle bundle);

        /**
         * 从地址界面选择地址返回所产生的地址信息
         */
        public abstract void getNewAdr();
    }
}
